/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package algoritmo;


public class IterativeDeepeningDFS extends DepthLimitedSearch {

    protected int profMax;

    public IterativeDeepeningDFS(int profMax) {
        super(1);
        this.profMax = profMax;
    }

    public Node search() {

        while (result == null) {
            result = super.search();
            profDeCorte++;
            if (profDeCorte > profMax) {
                break;
            }
        }
        return result;
    }
}
